﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="api_office2.aspx.cs" Inherits="api_office2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Just update 'api_enabled' item !!!!<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
                <asp:BoundField DataField="entity" HeaderText="entity" SortExpression="entity" />
                <asp:BoundField DataField="type" HeaderText="type" SortExpression="type" />
                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
                <asp:BoundField DataField="status" HeaderText="status" SortExpression="status" />
                <asp:BoundField DataField="valid_date" HeaderText="valid_date" SortExpression="valid_date" />
                <asp:BoundField DataField="expired_date" HeaderText="expired_date" SortExpression="expired_date" />
                <asp:CheckBoxField DataField="api_enabled" HeaderText="api_enabled" SortExpression="api_enabled" />
                <asp:BoundField DataField="dcs_airport" HeaderText="dcs_airport" SortExpression="dcs_airport" />
                <asp:CheckBoxField DataField="check_deposit" HeaderText="check_deposit" 
                    SortExpression="check_deposit" />
                <asp:BoundField DataField="deposit_currency" HeaderText="deposit_currency" 
                    SortExpression="deposit_currency" />
                <asp:BoundField DataField="deposit_balance" HeaderText="deposit_balance" 
                    SortExpression="deposit_balance" />
                <asp:BoundField DataField="done_user" HeaderText="done_user" 
                    SortExpression="done_user" />
                <asp:BoundField DataField="done_time" HeaderText="done_time" 
                    SortExpression="done_time" />
                <asp:BoundField DataField="rank" HeaderText="rank" SortExpression="rank" />
                <asp:CheckBoxField DataField="group_book" HeaderText="group_book" 
                    SortExpression="group_book" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SparrowDB %>"
            SelectCommand="SELECT * FROM [offices]" UpdateCommand="UPDATE [offices] SET [entity] = @entity, [type] = @type, [name] = @name, [status] = @status, [valid_date] = @valid_date, [expired_date] = @expired_date, [api_enabled] = @api_enabled, [max_seats] = @max_seats, [seats_count] = @seats_count, [count_date] = @count_date, [dcs_airport] = @dcs_airport, [done_user] = @done_user, [done_time] = @done_time, [rank] = @rank, [group_book] = @group_book WHERE [id] = @id">
            <DeleteParameters>
                <asp:Parameter Name="id" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="entity" Type="String" />
                <asp:Parameter Name="type" Type="String" />
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="status" Type="String" />
                <asp:Parameter Name="valid_date" Type="DateTime" />
                <asp:Parameter Name="expired_date" Type="DateTime" />
                <asp:Parameter Name="api_enabled" Type="Boolean" />
                <asp:Parameter Name="dcs_airport" Type="String" />
                <asp:Parameter Name="done_user" Type="String" />
                <asp:Parameter Name="done_time" Type="DateTime" />
                <asp:Parameter Name="rank" Type="String" />
                <asp:Parameter Name="group_book" Type="String" />
                <asp:Parameter Name="id" Type="String" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="id" Type="String" />
                <asp:Parameter Name="entity" Type="String" />
                <asp:Parameter Name="type" Type="String" />
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="status" Type="String" />
                <asp:Parameter Name="valid_date" Type="DateTime" />
                <asp:Parameter Name="expired_date" Type="DateTime" />
                <asp:Parameter Name="api_enabled" Type="Boolean" />
                <asp:Parameter Name="dcs_airport" Type="String" />
                <asp:Parameter Name="done_user" Type="String" />
                <asp:Parameter Name="done_time" Type="DateTime" />
                <asp:Parameter Name="rank" Type="String" />
                <asp:Parameter Name="group_book" Type="String" />
            </InsertParameters>
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
